<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>gschur</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Function</center>
    <div align="right">Last update : 20/12/2004</div>
    <p>
      <b>gschur</b> -  generalized Schur form (obsolete).  </p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>[As,Es]=gschur(A,E)  </tt>
      </dd>
      <dd>
        <tt>[As,Es,Q,Z]=gschur(A,E)  </tt>
      </dd>
      <dd>
        <tt>[As,Es,Z,dim] = gschur(A,E,flag)   </tt>
      </dd>
      <dd>
        <tt>[As,Es,Z,dim]= gschur(A,E,extern)  </tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>
    This function is obsolete and is now included in the <tt>
        <b>schur</b>
      </tt>
    function. In most cases the <tt>
        <b>gschur</b>
      </tt> function will still work as
    before, but it will be removed in the future release. </p>
    <p>
    The first three syntaxes can be replaced by</p>
    <pre>

[As,Es]=schur(A,E)
[As,Es,Q,Z]=schur(A,E);Q=Q' //NOTE THE TRANPOSITION HERE
[As,Es,Z,dim] = schur(A,E,flag) 
   
    </pre>
    <p>
    The last syntax requires little more adaptations:
  </p>
    <dl>
      <dd>
        <b>if</b>extern is a scilab function  the new calling sequence
        should be <tt>
          <b>[As,Es,Z,dim]= schur(A,E,Nextern)</b>
        </tt> with
        Nextern defined as follow:<pre>

function t=Nextern(R)
if R(2)==0 then
  t=extern([1,R(1),R(3)])==1
else
  c=(R(1)+%i*R(2))/R(3)
  t=extern([2,real(c+c'),real(c*c')])==1
end
endfunction
   
        </pre>
      </dd>
      <dd>
        <b>if</b>extern is the name of an external function coded in Fortran or C
    the new calling sequence should be <tt>
          <b>[As,Es,Z,dim]=    schur(A,E,'nextern')</b>
        </tt> with nextern defined as follow:</dd>
    </dl>
    <pre>

      logical function nextern(ar,ai,beta)
      double precision ar,ai,beta
      integer r,extern
      if (ai.eq.0.0d0) then
        r=extern(1,ar,beta,0.0d0,0.0d0)
      else
        r=extern(2,0.0d0,0.0d0,2.0d0*ar,ar*ar+ai*ai)
      endif
      nextern=r.eq.1
      end
   
    </pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="../programming/external.htm">
        <tt>
          <b>external</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="schur.htm">
        <tt>
          <b>schur</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
  </body>
</html>
